#!/bin/bash

echo "kill all chia-plotter and Space "
ps -A | grep 'chia-plotter' | awk '{print $1}' | awk '{print "kill "$1}' | bash
ps -A | grep 'ProofOfSpace' | awk '{print $1}' | awk '{print "kill "$1}' | bash

echo "clear tmp ..."
rm -rf ./.plotman/tmp
mkdir -p ./.plotman/tmp/00
mkdir -p ./.plotman/tmp/01
mkdir -p ./.plotman/tmp/02
mkdir -p ./.plotman/tmp/03

echo "clear logs ..."
rm -rf ./.plotman/logs
mkdir -p ./.plotman/logs

echo "show df"
df -h | grep "/dev/"

echo "all clear ok!"
